home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / VideoServices.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  4.5 KB  |  171 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        VideoServices.h
  3.  
  4.      Contains:    Video Services Library Interfaces.
  5.  
  6.      Version:    Technology:    PowerSurge 1.0.2
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __VIDEOSERVICES__
  19. #define __VIDEOSERVICES__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __NAMEREGISTRY__
  25. #include <NameRegistry.h>
  26. #endif
  27. #ifndef __QUICKDRAW__
  28. #include <Quickdraw.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     kTransparentEncoding        = 0,
  56.     kInvertingEncoding            = 1
  57. };
  58.  
  59.  
  60. enum {
  61.     kTransparentEncodingShift    = (kTransparentEncoding << 1),
  62.     kTransparentEncodedPixel    = (0x01 << kTransparentEncodingShift),
  63.     kInvertingEncodingShift        = (kInvertingEncoding << 1),
  64.     kInvertingEncodedPixel        = (0x01 << kInvertingEncodingShift)
  65. };
  66.  
  67.  
  68.  
  69.  
  70.  
  71. enum {
  72.     kHardwareCursorDescriptorMajorVersion = 0x0001,
  73.     kHardwareCursorDescriptorMinorVersion = 0x0000
  74. };
  75.  
  76. typedef UInt32 *                        UInt32Ptr;
  77.  
  78. struct HardwareCursorDescriptorRec {
  79.     UInt16                             majorVersion;
  80.     UInt16                             minorVersion;
  81.     UInt32                             height;
  82.     UInt32                             width;
  83.     UInt32                             bitDepth;
  84.     UInt32                             maskBitDepth;
  85.     UInt32                             numColors;
  86.     UInt32Ptr                         colorEncodings;
  87.     UInt32                             flags;
  88.     UInt32                             supportedSpecialEncodings;
  89.     UInt32                             specialEncodings[16];
  90. };
  91. typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
  92.  
  93. typedef HardwareCursorDescriptorRec *    HardwareCursorDescriptorPtr;
  94.  
  95. enum {
  96.     kHardwareCursorInfoMajorVersion = 0x0001,
  97.     kHardwareCursorInfoMinorVersion = 0x0000
  98. };
  99.  
  100.  
  101. struct HardwareCursorInfoRec {
  102.     UInt16                             majorVersion;                /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
  103.     UInt16                             minorVersion;                /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
  104.     UInt32                             cursorHeight;
  105.     UInt32                             cursorWidth;
  106.     CTabPtr                         colorMap;                    /* nil or big enough for hardware's max colors*/
  107.     Ptr                             hardwareCursor;
  108.     UInt32                             reserved[6];                /* Test tool should check for 0s*/
  109. };
  110. typedef struct HardwareCursorInfoRec    HardwareCursorInfoRec;
  111.  
  112. typedef HardwareCursorInfoRec *            HardwareCursorInfoPtr;
  113.  
  114.  
  115. enum {
  116.     kVBLInterruptServiceType    = FOUR_CHAR_CODE('vbl '),
  117.     kHBLInterruptServiceType    = FOUR_CHAR_CODE('hbl '),
  118.     kFrameInterruptServiceType    = FOUR_CHAR_CODE('fram'),
  119.     kConnectInterruptServiceType = FOUR_CHAR_CODE('dci '),        /* Renamed -- Use kFBCheckInterruptServiceType*/
  120.     kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/
  121.     kFBChangedInterruptServiceType = FOUR_CHAR_CODE('chng'),    /* Demand to rebuild (Hardware has reinitialized on dependent change)*/
  122.     kFBOfflineInterruptServiceType = FOUR_CHAR_CODE('remv'),    /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/
  123.     kFBOnlineInterruptServiceType = FOUR_CHAR_CODE('add ')        /* Notice that hardware is available (after being removed)*/
  124. };
  125.  
  126. typedef ResType                         InterruptServiceType;
  127. typedef UInt32                             InterruptServiceIDType;
  128. typedef InterruptServiceIDType *        InterruptServiceIDPtr;
  129. EXTERN_API_C( OSErr )
  130. VSLNewInterruptService            (RegEntryID *            serviceDevice,
  131.                                  InterruptServiceType     serviceType,
  132.                                  InterruptServiceIDPtr     serviceID);
  133.  
  134. EXTERN_API_C( OSErr )
  135. VSLWaitOnInterruptService        (InterruptServiceIDType  serviceID,
  136.                                  Duration                 timeout);
  137.  
  138. EXTERN_API_C( OSErr )
  139. VSLDisposeInterruptService        (InterruptServiceIDType  serviceID);
  140.  
  141. EXTERN_API_C( OSErr )
  142. VSLDoInterruptService            (InterruptServiceIDType  serviceID);
  143.  
  144. EXTERN_API_C( Boolean )
  145. VSLPrepareCursorForHardwareCursor (void *                cursorRef,
  146.                                  HardwareCursorDescriptorPtr  hardwareDescriptor,
  147.                                  HardwareCursorInfoPtr     hwCursorInfo);
  148.  
  149.  
  150.  
  151. #if PRAGMA_STRUCT_ALIGN
  152.     #pragma options align=reset
  153. #elif PRAGMA_STRUCT_PACKPUSH
  154.     #pragma pack(pop)
  155. #elif PRAGMA_STRUCT_PACK
  156.     #pragma pack()
  157. #endif
  158.  
  159. #ifdef PRAGMA_IMPORT_OFF
  160. #pragma import off
  161. #elif PRAGMA_IMPORT
  162. #pragma import reset
  163. #endif
  164.  
  165. #ifdef __cplusplus
  166. }
  167. #endif
  168.  
  169. #endif /* __VIDEOSERVICES__ */
  170.  
  171.